<?php
/**
 * Created by PhpStorm.
 * User: mac
 * Date: 2018/1/19
 * Time: 下午2:55
 */
date_default_timezone_set('PRC');
function file_get_contents_post($url, $post){

    $options = array(
        'http'=> array(
            'method'=>'POST',
            'content'=> http_build_query($post),
        ),
    );
    $result = file_get_contents($url,false, stream_context_create($options));
    return $result;
}
$param = array('count_no' => 2,'txt' => 'This page allows you to count the frequency usage of phrases in your work. Paste or type in your text below, and click submit');
$data = file_get_contents_post("http://www.writewords.org.uk/phrase_count.asp", $param);
//var_dump($data);


